package com.fishingwithme.infrastructure;

import lombok.Getter;
import lombok.Setter;
import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.userdetails.User;

import java.util.Collection;

@Getter
@Setter
public class FwmUserDetails extends User {
    private Long userId;
    private String avatarUrl;
    private String nickname;

    public FwmUserDetails(Long userId, String username, String password, Collection<? extends GrantedAuthority> authorities,String avatarUrl,String nickname) {
        super(username, password, authorities);
        this.userId = userId;
        this.avatarUrl = avatarUrl;
        this.nickname = nickname;
    }

    public FwmUserDetails(String username, String password, Collection<? extends GrantedAuthority> authorities) {
        super(username, password, authorities);
    }

    public FwmUserDetails(String username, String password, boolean enabled, boolean accountNonExpired, boolean credentialsNonExpired, boolean accountNonLocked, Collection<? extends GrantedAuthority> authorities) {
        super(username, password, enabled, accountNonExpired, credentialsNonExpired, accountNonLocked, authorities);
    }
}
